package com.wms.dao;


import com.wms.domain.InStoreDetailDomain;
import com.wms.domain.InStoreIdxDomain;
import com.wms.dto.InStoreDetailDto;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.mapstruct.Mapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Mapper
public interface InStoreMapper {

    public void addNotice(InStoreIdxDomain inStoreIdxDomain);

    public void addNoticeDetail(InStoreDetailDomain inStoreDetailDomain);

    public void noticeUpdate(InStoreIdxDomain inStoreIdxDomain);

    public void updateDetail(InStoreDetailDomain inStoreDetailDomain);


    @Delete("DELETE FROM in_store_detail WHERE in_store_id = ${id}")
    public void deleteNoticeDetail(Long id);

//    @Select("SELECT * FROM in_store_detail_view WHERE in_store_id = ${in_store_id}")
//    public List<HashMap<String, Object>>  getNoticeDetail(Long in_store_id);

    public List<HashMap<String, Object>> getInStoreDetail(Long in_store_id);

    @Select("select * from in_store_detail where id = ${id}")
    public InStoreDetailDomain getInStoreDetailById(Long id);

    @Select("select * from in_store_idx where id = ${id}")
    public InStoreIdxDomain getInStoreIdxById(Long id);
    public List<HashMap<String, Object>> getNoticePage(InStoreIdxDomain inStoreIdxDomain);

    public List<HashMap<String, Object>> getArrivedPage(InStoreDetailDto inStoreDetailDto);

    public void InStoreFinish();
}
